Allow login_userdomain getattr nsfs files #2506
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Similar to 3023aa8 ("Allow systemd-related domains getattr nsfs files") and follow-up commits, the same permission is needed for the systemd user instance, running in the user context.
The commit addresses the following AVC denial:
type=PROCTITLE msg=audit(01/07/2025 18:55:46.084:26366) : proctitle=systemd-tmpfiles --user --create --remove --boot type=PATH msg=audit(01/07/2025 18:55:46.084:26366) : item=0 name=/proc/self/ns/pid inode=4026531836 dev=00:04 mode=file,444 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:nsfs_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0 type=SYSCALL msg=audit(01/07/2025 18:55:46.084:26366) : arch=x86_64 syscall=newfstatat success=no exit=EACCES(Permission denied) a0=AT_FDCWD a1=0x7ffc89d3c6a0 a2=0x7ffc89d3c6c0 a3=0x0 items=1 ppid=471876 pid=471884 auid=user7401 uid=user7401 gid=user7401 euid=user7401 suid=user7401 fsuid=user7401 egid=user7401 sgid=user7401 fsgid=user7401 tty=(none) ses=765 comm=systemd-tmpfile exe=/usr/bin/systemd-tmpfiles subj=staff_u:staff_r:staff_t:s0-s0:c0.c1023 key=(null) type=AVC msg=audit(01/07/2025 18:55:46.084:26366) : avc: denied { getattr } for